/**
 * Copyright (c) 2024-2025 National Fundamental Software of China Co., Ltd.
 *
 * You should have find a copy of NFSChina License. If not, please contact us
 * by email <os_support@nfschina>
 *
**/

#ifndef RENAMEDIALOG_H
#define RENAMEDIALOG_H

#include <QDialog>
#include <QString>
#include <kcmodule.h>
//#include <com_nfs_systemsettings.h>
#include <org_freedesktop_hostname1.h>
#include <QKeyEvent>

namespace Ui {
class ReNameDialog;
}

class ReNameDialog : public QDialog
{
    Q_OBJECT

public:
    explicit ReNameDialog(QString hostname,QWidget *parent = nullptr);
    ~ReNameDialog();

public slots:
    void on_cancel_button_clicked();

    void on_rename_button_clicked();

protected:
    void keyPressEvent(QKeyEvent* event);

signals:
    void renamed(QString hostname);

private:
    Ui::ReNameDialog *ui;
    QString m_hostname;
    org::freedesktop::hostname1 *m_sys_info;
};

#endif // RENAMEDIALOG_H
